Add translation keymap support (#210)
authorD.K <beerandhot@gmail.com>
Wed, 29 May 2019 01:14:09 +0000 (04:14 +0300)
committerJustin Burkett <justin@burkett.cc>
Wed, 29 May 2019 01:14:09 +0000 (21:14 -0400)
which-key-tests.el
which-key.el

index 3e75d6fa62cb369d8ac352ff23e89c321a3aabd6..cff7fab56e639abc65588cf1a0c71194996eef5e 100644 (file)
     (define-key map "c" "c")
     (define-key map "dd" "dd")
     (define-key map "eee" "eee")
+    (define-key map "f" [123 45 6])
     (should (equal
              (sort (which-key--get-keymap-bindings map)
                    (lambda (a b) (string-lessp (car a) (car b))))
              '(("b" . "ignore")
                ("c" . "c")
                ("d" . "Prefix Command")
-               ("e" . "Prefix Command"))))
+               ("e" . "Prefix Command")
+               ("f" . "{ - C-f"))))
     (should (equal
              (sort (which-key--get-keymap-bindings map t)
                    (lambda (a b) (string-lessp (car a) (car b))))
              '(("b" . "ignore")
                ("c" . "c")
                ("d d" . "dd")
-               ("e e e" . "eee"))))))
+               ("e e e" . "eee")
+               ("f" . "{ - C-f"))))))
 
 (provide 'which-key-tests)
 ;;; which-key-tests.el ends here
index f4b15c4806adabbffbeae4b72b5ad918cc607465..99318d5f32079e569bff8e84fe28b2f249643233 100644 (file)
@@ -1741,6 +1741,7 @@ ones. PREFIX is for internal use and should not be used."
                           ((eq 'lambda (car-safe def)) "lambda")
                           ((eq 'menu-item (car-safe def)) "menu-item")
                           ((stringp def) def)
+                          ((vectorp def) (key-description def))
                           (t "unknown")))
                    bindings :test (lambda (a b) (string= (car a) (car b)))))))))
      keymap)